<template>
	<view class="posted-module">
		<u-navbar title="" bgColor="#ffffff" :autoBack="false" titleStyle="font-size: 32rpx;font-weight: 500;color: #000000;"
			placeholder @leftClick="gotoBack">
			<view class="u-nav-slot" slot="right" v-if="false">
				<image src='@/static/image/posted/three.png' class="three" />
			</view>
		</u-navbar>
		<view class="title-view">
			<view class="title">{{ $t('post.I-Posted') }}</view>
			<image src='@/static/image/posted/bg.png' class="bg" />
		</view>
		<view class="content-view">
			<view class="dating" @click="toDating">
				<view class="label">
					<image src='@/static/image/posted/dating.png' class="content-img" />
					<view class="label-title">{{ $t('discover.make-friends') }}</view>
				</view>
				<view class="iconfont icon-jiantou-you arrow-icon"></view>
			</view>
			<view class="dating" @click="gotoPage('/pagesUser/feeService/feeService')">
				<view class="label">
					<image src='@/static/image/posted/fee.png' class="content-img" />
					<view class="label-title">{{ $t('discover.Services-for-a-fee') }}</view>
				</view>
				<view class="iconfont icon-jiantou-you arrow-icon"></view>
			</view>
			<view class="dating" @click="gotoPage('/pagesUser/jobs/myPosted')">
				<view class="label">
					<image src='@/static/image/posted/jobs.png' class="content-img" />
					<view class="label-title">{{ $t('discover.Jobs') }}</view>
				</view>
				<view class="iconfont icon-jiantou-you arrow-icon"></view>
			</view>
			<view class="dating" @click="gotoPage('/pagesUser/information/information')">
				<view class="label">
					<image src='@/static/image/posted/info.png' class="content-img" />
					<view class="label-title">{{ $t('discover.information') }}</view>
				</view>
				<view class="iconfont icon-jiantou-you arrow-icon"></view>
			</view>
			<view class="dating" @click="gotoPage('/pagesUser/bourse/myPosted',1)">
				<view class="label">
					<image src='@/static/image/posted/tran.png' class="content-img" />
					<view class="label-title">{{ $t('discover.exchange') }}</view>
				</view>
				<view class="iconfont icon-jiantou-you arrow-icon"></view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		queryChangeip
	} from "@/services/login";
export default {
	
	data() {
		return {

		}
	},
	methods: {
		
		// 返回上一页
		gotoBack() {
			uni.switchTab({
				url: '/pages/user/User'
			});
		},
		toDating() {
			if (!this.$store.state.friendsInformation.userPersonalsId) {
				this.gotoPage('/pagesDiscover/friendsInformation/EditData')
			} else {
				this.gotoPage('/pagesDiscover/friendsInformation/FriendsInformation')
			}
		},
		gotoPage(url, type) {
			if (type == 1) {
				queryChangeip().then(res=>{
					console.log(res)
					if(res.result.data==='中国'){
						 uni.showToast({
						 	title:this.$t('newDeal.msg'),
							icon:'none'
						 })
					}else{
						uni.navigateTo({
							url,
						})
					}
				})
				// uni.switchTab({
				// 	url,
				// });
				return;
			}
			uni.navigateTo({
				url,
			})
		}
	}
}
</script>

<style lang="scss" scoped>
.posted-module {
	box-sizing: border-box;

	.three {
		width: 48upx;
		height: 48upx;
	}

	.title {
		font-size: 48upx;
		font-weight: bold;
		color: #000000;
	}

	.bg {
		width: 430upx;
		height: 380upx;
	}

	.title-view {
		padding: 30upx 0upx 0upx 30upx;
		margin-top: 30upx;
		display: flex;
		z-index: -1;
		align-items: center;
		justify-content: space-between;
	}

	.content-view {
		padding: 50upx 30upx;
		margin-top: -90upx;
		background: #FFFFFF;
		z-index: 100;
		position: relative;
		border-radius: 50upx 50upx 0upx 0upx;
		opacity: 1;
		min-height: calc(100vh - 520upx);
	}

	.dating {
		padding: 38upx 30upx;
		background: #FFFFFF;
		box-shadow: 0upx 20upx 40upx 0upx rgba(39, 133, 122, 0.1), inset 0upx 0upx 20upx 0upx rgba(97, 189, 178, 0.1);
		border-radius: 30upx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin-bottom: 60upx;
	}

	.label {
		display: flex;
		align-items: center;

		.content-img {
			width: 80upx;
			height: 80upx;
			margin-right: 20upx;
		}

		.label-title {
			font-size: 36upx;
			font-weight: 500;
			color: #000000;
		}
	}

	.arrow-icon {
		color: #a6a6a6;
		font-size: 30upx;
	}
}</style>
